package com.century.sjt.activity;

import android.os.Bundle;
import android.view.WindowManager;

import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;
import com.classic.core.activity.BaseActivity;

import butterknife.ButterKnife;

/**
 * @author:周玲波
 * @Description: 公共Activity
 * @date : 2016/8/13 16:59
 */
public abstract class AppBaseActivity extends BaseActivity{
    protected RequestQueue mQueue=null;
    @Override
    public void initView(Bundle savedInstanceState) {
        super.initView(savedInstanceState);
        //透明状态栏
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
        //透明导航栏
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
        if(mQueue==null)
            mQueue = Volley.newRequestQueue(this);

        ButterKnife.bind(this);
    }
    @Override
    protected void onDestroy() {
        super.onDestroy();
        if(mQueue!=null)
            mQueue.cancelAll(this);
    }
}
